package com.usefullc.crawler.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.usefullc.common.domain.BaseDomain;
import com.usefullc.crawler.domain.Active;
import com.usefullc.system.service.component.extend.ApiField;
import com.usefullc.system.service.component.extend.DictField;
import com.usefullc.system.service.component.extend.EnumField;
import com.usefullc.system.service.component.extend.UsefulField;
import com.usefullc.system.service.component.extend.ApiField;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 爬虫活动返回实体
 * @author: 星空
 * @date: 2022-07-27
 */
@Data
public class ActiveVo extends BaseDomain {

//useful_auto_generate_section_start


    @ApiModelProperty(notes = "名称")
    private String name;

    @ApiField(url = "/crawler/template/listAll", id = "id", value = "name")
    @ApiModelProperty(notes = "模板")
    private Long templateId;


    @ApiModelProperty(notes = "请求方法")
    private String method;

    @EnumField(value = "requestTypeEnum")
    @ApiModelProperty(notes = "请求类型")
    private Integer requestType;


    @ApiModelProperty(notes = "数据状态（0 不存在，1 存在）")
    private Boolean delState;

    @EnumField(value = "activeStatusEnum")
    @ApiModelProperty(notes = "状态")
    private Integer status;

    @EnumField(value = "webDriverTypeEnum")
    @ApiModelProperty(notes = "selenium驱动类型")
    private String webDriverType;


    @ApiModelProperty(notes = "ID")
    private Long id;


    @ApiModelProperty(notes = "解析屏蔽表达式")
    private String analyseBanExpress;

    @UsefulField(format = "yyyy-MM-dd")
    @ApiModelProperty(notes = "数据创建时间")
    private Date gmtCreate;

    @UsefulField(format = "yyyy-MM-dd")
    @ApiModelProperty(notes = "数据最后修改时间")
    private Date gmtModified;


    @ApiModelProperty(notes = "解析表达式")
    private String analyseExpress;

    @ApiModelProperty(notes = "解析提取URL表达式")
    @TableField(value="`analyseDataExpress`")
    private String analyseDataExpress;


    @ApiModelProperty(notes = "序号")
    private Integer orderNo;


    @ApiModelProperty(notes = "解析切换代理表达式")
    private String switchProxyExpress;


    @ApiModelProperty(notes = "请求url")
    private String url;


    @ApiModelProperty(notes = "等待css选择表达式")
    private String waitCssSelectorExpress;


    @ApiModelProperty(notes = "Cookie")
    private String cookie;


    @ApiModelProperty(notes = "提取数据的url")
    private String extractDataUrl;


    @ApiModelProperty(notes = "UI事件脚本")
    private String uiEventScript;

    @ApiModelProperty(notes = "Html提取表达式类型（0 静态；1 动态）")
    private Integer analyseExpressType;

    @ApiModelProperty(notes = "变量")
    private String variables;
//useful_auto_generate_section_end

    @ApiModelProperty(notes = "脏数据css选择表达式")
    private String dirtyCssSelectorExpress;

    @ApiModelProperty(notes = "运行超时时间")
    private Integer runTimeout;

    @ApiModelProperty(notes = "请求body")
    @TableField(value = "`requestBody`")
    private String requestBody;

    @ApiModelProperty(notes = "请求头部")
    @TableField(value = "`requestHeaders`")
    private String requestHeaders;
}
